<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: LEAF/Inc/leaf-sampling.h Source File</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_127e6aa213d41105176fe0c3bbb2560c.html">LEAF</a></li><li class="navelem"><a class="el" href="dir_2638202b9749e6ce2c919e410b7e2f43.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">leaf-sampling.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*==============================================================================</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> leaf-sampling.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Created: 23 Jan 2019 11:22:09am</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Author:  Mike Mulshine</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> ==============================================================================*/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef LEAF_SAMPLING_H_INCLUDED</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define LEAF_SAMPLING_H_INCLUDED</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;leaf-global.h&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;leaf-math.h&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;leaf-envelopes.h&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;leaf-analysis.h&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">enum</span> RecordMode</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        RecordOneShot = 0,</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        RecordLoop,</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        RecordModeNil</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    } RecordMode;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tBuffer</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        </div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordtype">float</span>* buff;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        uint32_t idx;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        uint32_t bufferLength;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        uint32_t recordedLength;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        uint32_t channels;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        uint32_t sampleRate;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        RecordMode mode;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="keywordtype">int</span> active;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    } _tBuffer;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keyword">typedef</span> _tBuffer* tBuffer;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#ga91d93789b64c9306b30933c5e8d001fd">tBuffer_init</a>                  (tBuffer* <span class="keyword">const</span>, uint32_t length, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#gad24562bae9e5411aa917bee6f27d4153">tBuffer_initToPool</a>             (tBuffer* <span class="keyword">const</span> sb, uint32_t length, tMempool* <span class="keyword">const</span> mp);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#gaa7addef34b26a9464a59f023d690ec04">tBuffer_free</a>                  (tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#gadad3503c475071c5240b37c768f64be2">tBuffer_tick</a>                  (tBuffer* <span class="keyword">const</span>, <span class="keywordtype">float</span> sample);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#ga73438e2159fac7b67563b1009ca9c7f6">tBuffer_read</a>                  (tBuffer* <span class="keyword">const</span>, <span class="keywordtype">float</span>* buff, uint32_t len);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordtype">float</span> <a class="code" href="group__tbuffer.html#ga69d5397829f174b81a621170367a8550">tBuffer_get</a>                   (tBuffer* <span class="keyword">const</span>, <span class="keywordtype">int</span> idx);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#ga55baf7685651fd7f9926dc0ed5b2d73b">tBuffer_record</a>                (tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#ga9fcb0f6e0fb037edf1146a3983d8424d">tBuffer_stop</a>                  (tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="keywordtype">void</span> tBuffer_setBuffer                (tBuffer* <span class="keyword">const</span> sb, <span class="keywordtype">float</span>* externalBuffer, <span class="keywordtype">int</span> length, <span class="keywordtype">int</span> channels, <span class="keywordtype">int</span> sampleRate);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keywordtype">int</span>   <a class="code" href="group__tbuffer.html#gaa7ff30c7c2c6de87ed61c8025620429f">tBuffer_getRecordPosition</a>     (tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordtype">void</span>   <a class="code" href="group__tbuffer.html#ga893981a1b088cb6cd43359f869069689">tBuffer_setRecordPosition</a>    (tBuffer* <span class="keyword">const</span>, <span class="keywordtype">int</span> pos);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#ga22b4855b2f2e94a7f870de419b3c3c84">tBuffer_setRecordMode</a>         (tBuffer* <span class="keyword">const</span>, RecordMode mode);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="group__tbuffer.html#ga39fb5d9d5ed963390e45322a2a97a1f1">tBuffer_clear</a>                 (tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    uint32_t <a class="code" href="group__tbuffer.html#ga79955880600cfd3ec722b7110a4aab33">tBuffer_getBufferLength</a>    (tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    uint32_t <a class="code" href="group__tbuffer.html#gaa68440f784cd947e6bb4eb00cd6473b5">tBuffer_getRecordedLength</a>  (tBuffer* <span class="keyword">const</span> sb);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <span class="keywordtype">void</span>     <a class="code" href="group__tbuffer.html#ga28a6063f2d763e4ba9414c797c1884b4">tBuffer_setRecordedLength</a>    (tBuffer* <span class="keyword">const</span> sb, <span class="keywordtype">int</span> length);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <span class="keywordtype">int</span>     <a class="code" href="group__tbuffer.html#ga37ffab4845668d588eac944f4adb1f65">tBuffer_isActive</a>            (tBuffer* <span class="keyword">const</span> sb);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    </div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">enum</span> PlayMode</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    {</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        PlayNormal,</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        PlayLoop,</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        PlayBackAndForth,</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        PlayModeNil</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    } PlayMode;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    </div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tSampler</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        </div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        tBuffer samp;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="keywordtype">float</span> leafInvSampleRate;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="keywordtype">float</span> leafSampleRate;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keywordtype">float</span> ticksPerSevenMs;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        <span class="keywordtype">float</span> rateFactor;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        uint32_t channels;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        </div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        tRamp gain;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        <span class="keywordtype">float</span> idx;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        <span class="keywordtype">float</span> inc;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <span class="keywordtype">float</span> last;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordtype">float</span> iinc;</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        int8_t dir;</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        int8_t flip;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        int8_t bnf;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        </div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        int32_t start, targetstart;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        int32_t end, targetend;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        </div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        uint32_t len;</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        uint32_t cfxlen;</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordtype">float</span> numticks;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        PlayMode mode;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="keywordtype">int</span> retrigger;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="keywordtype">int</span> active;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        </div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        uint8_t inCrossfade;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        </div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keywordtype">float</span> flipStart;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        <span class="keywordtype">float</span> flipIdx;</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    } _tSampler;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    </div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keyword">typedef</span> _tSampler* tSampler;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    </div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gabe6b68ce1ad3be371e341671e131d8d1">tSampler_init</a>               (tSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    <span class="keywordtype">void</span>     tSampler_initToPool            (tSampler* <span class="keyword">const</span> sp, tBuffer* <span class="keyword">const</span> b, tMempool* <span class="keyword">const</span> mp, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#ga8294d4396e241ff583d5a0208a262a6f">tSampler_free</a>               (tSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tsampler.html#gaf22e3192bf74770101ecae67268ed465">tSampler_tick</a>               (tSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordtype">float</span>    tSampler_tickStereo            (tSampler* <span class="keyword">const</span> sp, <span class="keywordtype">float</span>* outputArray);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gaf6e374c6d252d986b46415223980088e">tSampler_setSample</a>          (tSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#ga7790cb700416a22238238fea75f0c632">tSampler_setMode</a>            (tSampler* <span class="keyword">const</span>, PlayMode mode);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gaca8fd3a386f7b5c12584820b76be70b6">tSampler_play</a>               (tSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gaf3dd0f9013b69cf4c3a6199b674925c0">tSampler_stop</a>               (tSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gac7dc95f6705399e73778c96904df2390">tSampler_setStart</a>           (tSampler* <span class="keyword">const</span>, int32_t start);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#ga36696178ca3f0bc7b8eef6786fe81faa">tSampler_setEnd</a>             (tSampler* <span class="keyword">const</span>, int32_t end);</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#ga498ced8a867faef896eb7ed194f86040">tSampler_setLength</a>             (tSampler* <span class="keyword">const</span>, int32_t length);</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gaa3b3bdfaff5b05513c777a586ad7fac5">tSampler_setCrossfadeLength</a> (tSampler* <span class="keyword">const</span> sp, uint32_t length);</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tsampler.html#gadaccb8d16c9870ba327b4ab51ebc3b7e">tSampler_setRate</a>            (tSampler* <span class="keyword">const</span>, <span class="keywordtype">float</span> rate);</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    </div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    </div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tAutoSampler</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    {</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        </div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        tSampler sampler;</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        tEnvelopeFollower ef;</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        uint32_t windowSize;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        <span class="keywordtype">float</span> threshold;</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;        <span class="keywordtype">float</span> previousPower;</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        uint32_t sampleCounter;</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        uint32_t powerCounter;</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        uint8_t sampleTriggered;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    } _tAutoSampler;</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    <span class="keyword">typedef</span> _tAutoSampler* tAutoSampler;</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    </div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#gafbc477a175f7abfd083b150e7fb425eb">tAutoSampler_init</a>               (tAutoSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keywordtype">void</span>    tAutoSampler_initToPool         (tAutoSampler* <span class="keyword">const</span> as, tBuffer* <span class="keyword">const</span> b, tMempool* <span class="keyword">const</span> mp, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#ga1317602e4195ebc58d6df3f0263c4bb8">tAutoSampler_free</a>               (tAutoSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    </div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__tautosampler.html#ga201113e0c5d4a209bc98719162d256c0">tAutoSampler_tick</a>               (tAutoSampler* <span class="keyword">const</span>, <span class="keywordtype">float</span> input);</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#gae3740600b81b2d3ecc2f76b354996873">tAutoSampler_setBuffer</a>          (tAutoSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#ga2310af54d4e60debedd10003d6ec8113">tAutoSampler_setMode</a>            (tAutoSampler* <span class="keyword">const</span>, PlayMode mode);</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#ga49675d40778b000fce44454eca05f476">tAutoSampler_play</a>               (tAutoSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#gaa267e6bad2805ca746b9189ea38cf040">tAutoSampler_stop</a>               (tAutoSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#gaa163a4ea5f76285fdb51de157185740e">tAutoSampler_setThreshold</a>       (tAutoSampler* <span class="keyword">const</span>, <span class="keywordtype">float</span> thresh);</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#gabe80e37e28f7b454acf1621ab703506f">tAutoSampler_setWindowSize</a>      (tAutoSampler* <span class="keyword">const</span>, uint32_t size);</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#ga45d69e59ff3924446ff833940adba2db">tAutoSampler_setCrossfadeLength</a> (tAutoSampler* <span class="keyword">const</span>, uint32_t length);</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__tautosampler.html#ga8abfe84e7aaf00dc70b5b6e96d99af63">tAutoSampler_setRate</a>            (tAutoSampler* <span class="keyword">const</span>, <span class="keywordtype">float</span> rate);</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    </div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;    </div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;<span class="preprocessor">#define FILLEN 256</span></div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    </div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    <span class="keyword">typedef</span> <span class="keyword">struct </span>_tMBSampler</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;    {</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        </div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;        tMempool mempool;</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;        </div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        tBuffer samp;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;        PlayMode mode;</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;        <span class="keywordtype">int</span> active;</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;        </div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;        tExpSmooth gain;</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        </div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;        <span class="keywordtype">float</span>    out;</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        <span class="keywordtype">float</span>    last, beforeLast;</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;        <span class="keywordtype">float</span>    amp;</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;        <span class="keywordtype">float</span>    last_amp;</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;        <span class="keywordtype">float</span>    syncin;</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;        <span class="keywordtype">float</span>   _p, _w, _z;</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;        <span class="keywordtype">float</span>   _last_w;</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;        <span class="keywordtype">float</span>   _f [FILLEN + STEP_DD_PULSE_LENGTH];</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;        <span class="keywordtype">int</span>     _j;</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;        </div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;        <span class="keywordtype">int</span>     start, end;</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        <span class="keywordtype">int</span>     currentLoopLength;</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    } _tMBSampler;</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    </div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;    <span class="keyword">typedef</span> _tMBSampler* tMBSampler;</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    </div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#gaca3e3353a058e3b2d2231daba80e2cba">tMBSampler_init</a>               (tMBSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>, <a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga0cf8b1c9137072b7c99deeb3749a8f13">tMBSampler_initToPool</a>         (tMBSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>, tMempool* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#gabf7ea61189e14b7df128c279342ecabb">tMBSampler_free</a>               (tMBSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    </div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;    <span class="keywordtype">float</span>   <a class="code" href="group__t_m_b_sampler.html#gaa96c1712d883af90494934258901ef98">tMBSampler_tick</a>               (tMBSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga5df0750a1c82828dc7c3d654fd633c63">tMBSampler_setSample</a>          (tMBSampler* <span class="keyword">const</span>, tBuffer* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga7017647251f4c6bf8ab2e919cf1d72a0">tMBSampler_setMode</a>            (tMBSampler* <span class="keyword">const</span>, PlayMode mode);</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga8b91b8513f515bd0a26411b14c2c43d6">tMBSampler_play</a>               (tMBSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga4f7de005419ba042c280bc6aa0a43013">tMBSampler_stop</a>               (tMBSampler* <span class="keyword">const</span>);</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga2adcb66cf57f16c7852fbffb4b6d2201">tMBSampler_setStart</a>           (tMBSampler* <span class="keyword">const</span>, int32_t start);</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#gaf3fcfc2f5f9b14c712bc59d9e91d5365">tMBSampler_setEnd</a>             (tMBSampler* <span class="keyword">const</span>, int32_t end);</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#ga066b4da5f29266f9138772944f403d8b">tMBSampler_setLength</a>          (tMBSampler* <span class="keyword">const</span>, int32_t length);</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    <span class="keywordtype">void</span>    <a class="code" href="group__t_m_b_sampler.html#gafd87c733fd6c73885b84ac9d02b43f5a">tMBSampler_setRate</a>            (tMBSampler* <span class="keyword">const</span>, <span class="keywordtype">float</span> rate);</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    </div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;}</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160; </div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;<span class="preprocessor">#endif // LEAF_SAMPLING_H_INCLUDED</span></div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160; </div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;<span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="agroup__tbuffer_html_ga893981a1b088cb6cd43359f869069689"><div class="ttname"><a href="group__tbuffer.html#ga893981a1b088cb6cd43359f869069689">tBuffer_setRecordPosition</a></div><div class="ttdeci">void tBuffer_setRecordPosition(tBuffer *const, int pos)</div><div class="ttdoc">Set the recording position, from where the buffer will next add samples.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:118</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_gaf3fcfc2f5f9b14c712bc59d9e91d5365"><div class="ttname"><a href="group__t_m_b_sampler.html#gaf3fcfc2f5f9b14c712bc59d9e91d5365">tMBSampler_setEnd</a></div><div class="ttdeci">void tMBSampler_setEnd(tMBSampler *const, int32_t end)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1552</div></div>
<div class="ttc" id="agroup__tautosampler_html_gaa267e6bad2805ca746b9189ea38cf040"><div class="ttname"><a href="group__tautosampler.html#gaa267e6bad2805ca746b9189ea38cf040">tAutoSampler_stop</a></div><div class="ttdeci">void tAutoSampler_stop(tAutoSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1184</div></div>
<div class="ttc" id="agroup__tsampler_html_gadaccb8d16c9870ba327b4ab51ebc3b7e"><div class="ttname"><a href="group__tsampler.html#gadaccb8d16c9870ba327b4ab51ebc3b7e">tSampler_setRate</a></div><div class="ttdeci">void tSampler_setRate(tSampler *const, float rate)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1073</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga39fb5d9d5ed963390e45322a2a97a1f1"><div class="ttname"><a href="group__tbuffer.html#ga39fb5d9d5ed963390e45322a2a97a1f1">tBuffer_clear</a></div><div class="ttdeci">void tBuffer_clear(tBuffer *const)</div><div class="ttdoc">Clear the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:130</div></div>
<div class="ttc" id="agroup__tsampler_html_gaca8fd3a386f7b5c12584820b76be70b6"><div class="ttname"><a href="group__tsampler.html#gaca8fd3a386f7b5c12584820b76be70b6">tSampler_play</a></div><div class="ttdeci">void tSampler_play(tSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:843</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga2adcb66cf57f16c7852fbffb4b6d2201"><div class="ttname"><a href="group__t_m_b_sampler.html#ga2adcb66cf57f16c7852fbffb4b6d2201">tMBSampler_setStart</a></div><div class="ttdeci">void tMBSampler_setStart(tMBSampler *const, int32_t start)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1543</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga73438e2159fac7b67563b1009ca9c7f6"><div class="ttname"><a href="group__tbuffer.html#ga73438e2159fac7b67563b1009ca9c7f6">tBuffer_read</a></div><div class="ttdeci">void tBuffer_read(tBuffer *const, float *buff, uint32_t len)</div><div class="ttdoc">Read an input buffer into the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:81</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_gafd87c733fd6c73885b84ac9d02b43f5a"><div class="ttname"><a href="group__t_m_b_sampler.html#gafd87c733fd6c73885b84ac9d02b43f5a">tMBSampler_setRate</a></div><div class="ttdeci">void tMBSampler_setRate(tMBSampler *const, float rate)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1568</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga91d93789b64c9306b30933c5e8d001fd"><div class="ttname"><a href="group__tbuffer.html#ga91d93789b64c9306b30933c5e8d001fd">tBuffer_init</a></div><div class="ttdeci">void tBuffer_init(tBuffer *const, uint32_t length, LEAF *const leaf)</div><div class="ttdoc">Initialize a tBuffer to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:27</div></div>
<div class="ttc" id="agroup__tbuffer_html_gaa7ff30c7c2c6de87ed61c8025620429f"><div class="ttname"><a href="group__tbuffer.html#gaa7ff30c7c2c6de87ed61c8025620429f">tBuffer_getRecordPosition</a></div><div class="ttdeci">int tBuffer_getRecordPosition(tBuffer *const)</div><div class="ttdoc">Get the recording position, from where the buffer will next add samples.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:112</div></div>
<div class="ttc" id="agroup__tautosampler_html_ga49675d40778b000fce44454eca05f476"><div class="ttname"><a href="group__tautosampler.html#ga49675d40778b000fce44454eca05f476">tAutoSampler_play</a></div><div class="ttdeci">void tAutoSampler_play(tAutoSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1179</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga7017647251f4c6bf8ab2e919cf1d72a0"><div class="ttname"><a href="group__t_m_b_sampler.html#ga7017647251f4c6bf8ab2e919cf1d72a0">tMBSampler_setMode</a></div><div class="ttdeci">void tMBSampler_setMode(tMBSampler *const, PlayMode mode)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1514</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga0cf8b1c9137072b7c99deeb3749a8f13"><div class="ttname"><a href="group__t_m_b_sampler.html#ga0cf8b1c9137072b7c99deeb3749a8f13">tMBSampler_initToPool</a></div><div class="ttdeci">void tMBSampler_initToPool(tMBSampler *const, tBuffer *const, tMempool *const)</div><div class="ttdoc">Initialize a tMBSampler to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1222</div></div>
<div class="ttc" id="agroup__tautosampler_html_gafbc477a175f7abfd083b150e7fb425eb"><div class="ttname"><a href="group__tautosampler.html#gafbc477a175f7abfd083b150e7fb425eb">tAutoSampler_init</a></div><div class="ttdeci">void tAutoSampler_init(tAutoSampler *const, tBuffer *const, LEAF *const leaf)</div><div class="ttdoc">Initialize a tAutoSampler to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1094</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga28a6063f2d763e4ba9414c797c1884b4"><div class="ttname"><a href="group__tbuffer.html#ga28a6063f2d763e4ba9414c797c1884b4">tBuffer_setRecordedLength</a></div><div class="ttdeci">void tBuffer_setRecordedLength(tBuffer *const sb, int length)</div><div class="ttdoc">Set the length of what is considered recorded audio in the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:163</div></div>
<div class="ttc" id="agroup__tsampler_html_ga498ced8a867faef896eb7ed194f86040"><div class="ttname"><a href="group__tsampler.html#ga498ced8a867faef896eb7ed194f86040">tSampler_setLength</a></div><div class="ttdeci">void tSampler_setLength(tSampler *const, int32_t length)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1066</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_gaa96c1712d883af90494934258901ef98"><div class="ttname"><a href="group__t_m_b_sampler.html#gaa96c1712d883af90494934258901ef98">tMBSampler_tick</a></div><div class="ttdeci">float tMBSampler_tick(tMBSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1273</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga22b4855b2f2e94a7f870de419b3c3c84"><div class="ttname"><a href="group__tbuffer.html#ga22b4855b2f2e94a7f870de419b3c3c84">tBuffer_setRecordMode</a></div><div class="ttdeci">void tBuffer_setRecordMode(tBuffer *const, RecordMode mode)</div><div class="ttdoc">Set the recording mode.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:124</div></div>
<div class="ttc" id="agroup__tbuffer_html_gadad3503c475071c5240b37c768f64be2"><div class="ttname"><a href="group__tbuffer.html#gadad3503c475071c5240b37c768f64be2">tBuffer_tick</a></div><div class="ttdeci">void tBuffer_tick(tBuffer *const, float sample)</div><div class="ttdoc">If recording, add a sample to the buffer. Otherwise do nothing.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:56</div></div>
<div class="ttc" id="agroup__tautosampler_html_ga45d69e59ff3924446ff833940adba2db"><div class="ttname"><a href="group__tautosampler.html#ga45d69e59ff3924446ff833940adba2db">tAutoSampler_setCrossfadeLength</a></div><div class="ttdeci">void tAutoSampler_setCrossfadeLength(tAutoSampler *const, uint32_t length)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1204</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_gabf7ea61189e14b7df128c279342ecabb"><div class="ttname"><a href="group__t_m_b_sampler.html#gabf7ea61189e14b7df128c279342ecabb">tMBSampler_free</a></div><div class="ttdeci">void tMBSampler_free(tMBSampler *const)</div><div class="ttdoc">Free a tMBSampler from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1250</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga37ffab4845668d588eac944f4adb1f65"><div class="ttname"><a href="group__tbuffer.html#ga37ffab4845668d588eac944f4adb1f65">tBuffer_isActive</a></div><div class="ttdeci">int tBuffer_isActive(tBuffer *const sb)</div><div class="ttdoc">Check if the buffer is recording.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:169</div></div>
<div class="ttc" id="agroup__tsampler_html_gaf3dd0f9013b69cf4c3a6199b674925c0"><div class="ttname"><a href="group__tsampler.html#gaf3dd0f9013b69cf4c3a6199b674925c0">tSampler_stop</a></div><div class="ttdeci">void tSampler_stop(tSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:884</div></div>
<div class="ttc" id="agroup__tsampler_html_ga36696178ca3f0bc7b8eef6786fe81faa"><div class="ttname"><a href="group__tsampler.html#ga36696178ca3f0bc7b8eef6786fe81faa">tSampler_setEnd</a></div><div class="ttdeci">void tSampler_setEnd(tSampler *const, int32_t end)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:996</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga55baf7685651fd7f9926dc0ed5b2d73b"><div class="ttname"><a href="group__tbuffer.html#ga55baf7685651fd7f9926dc0ed5b2d73b">tBuffer_record</a></div><div class="ttdeci">void tBuffer_record(tBuffer *const)</div><div class="ttdoc">Start recording samples into the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:99</div></div>
<div class="ttc" id="agroup__tautosampler_html_gaa163a4ea5f76285fdb51de157185740e"><div class="ttname"><a href="group__tautosampler.html#gaa163a4ea5f76285fdb51de157185740e">tAutoSampler_setThreshold</a></div><div class="ttdeci">void tAutoSampler_setThreshold(tAutoSampler *const, float thresh)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1190</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga79955880600cfd3ec722b7110a4aab33"><div class="ttname"><a href="group__tbuffer.html#ga79955880600cfd3ec722b7110a4aab33">tBuffer_getBufferLength</a></div><div class="ttdeci">uint32_t tBuffer_getBufferLength(tBuffer *const)</div><div class="ttdoc">Get the length of the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:151</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga8b91b8513f515bd0a26411b14c2c43d6"><div class="ttname"><a href="group__t_m_b_sampler.html#ga8b91b8513f515bd0a26411b14c2c43d6">tMBSampler_play</a></div><div class="ttdeci">void tMBSampler_play(tMBSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1520</div></div>
<div class="ttc" id="agroup__tsampler_html_ga8294d4396e241ff583d5a0208a262a6f"><div class="ttname"><a href="group__tsampler.html#ga8294d4396e241ff583d5a0208a262a6f">tSampler_free</a></div><div class="ttdeci">void tSampler_free(tSampler *const)</div><div class="ttdoc">Free a tSampler from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:244</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga69d5397829f174b81a621170367a8550"><div class="ttname"><a href="group__tbuffer.html#ga69d5397829f174b81a621170367a8550">tBuffer_get</a></div><div class="ttdeci">float tBuffer_get(tBuffer *const, int idx)</div><div class="ttdoc">Get the sample recorded at a given position in the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:92</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga066b4da5f29266f9138772944f403d8b"><div class="ttname"><a href="group__t_m_b_sampler.html#ga066b4da5f29266f9138772944f403d8b">tMBSampler_setLength</a></div><div class="ttdeci">void tMBSampler_setLength(tMBSampler *const, int32_t length)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1562</div></div>
<div class="ttc" id="agroup__tsampler_html_gaa3b3bdfaff5b05513c777a586ad7fac5"><div class="ttname"><a href="group__tsampler.html#gaa3b3bdfaff5b05513c777a586ad7fac5">tSampler_setCrossfadeLength</a></div><div class="ttdeci">void tSampler_setCrossfadeLength(tSampler *const sp, uint32_t length)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:834</div></div>
<div class="ttc" id="agroup__tsampler_html_gabe6b68ce1ad3be371e341671e131d8d1"><div class="ttname"><a href="group__tsampler.html#gabe6b68ce1ad3be371e341671e131d8d1">tSampler_init</a></div><div class="ttdeci">void tSampler_init(tSampler *const, tBuffer *const, LEAF *const leaf)</div><div class="ttdoc">Initialize a tSampler to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:181</div></div>
<div class="ttc" id="agroup__tsampler_html_ga7790cb700416a22238238fea75f0c632"><div class="ttname"><a href="group__tsampler.html#ga7790cb700416a22238238fea75f0c632">tSampler_setMode</a></div><div class="ttdeci">void tSampler_setMode(tSampler *const, PlayMode mode)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:828</div></div>
<div class="ttc" id="agroup__tsampler_html_gaf6e374c6d252d986b46415223980088e"><div class="ttname"><a href="group__tsampler.html#gaf6e374c6d252d986b46415223980088e">tSampler_setSample</a></div><div class="ttdeci">void tSampler_setSample(tSampler *const, tBuffer *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:252</div></div>
<div class="ttc" id="agroup__tautosampler_html_gae3740600b81b2d3ecc2f76b354996873"><div class="ttname"><a href="group__tautosampler.html#gae3740600b81b2d3ecc2f76b354996873">tAutoSampler_setBuffer</a></div><div class="ttdeci">void tAutoSampler_setBuffer(tAutoSampler *const, tBuffer *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1164</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_gaca3e3353a058e3b2d2231daba80e2cba"><div class="ttname"><a href="group__t_m_b_sampler.html#gaca3e3353a058e3b2d2231daba80e2cba">tMBSampler_init</a></div><div class="ttdeci">void tMBSampler_init(tMBSampler *const, tBuffer *const, LEAF *const leaf)</div><div class="ttdoc">Initialize a tMBSampler to the default mempool of a LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1217</div></div>
<div class="ttc" id="agroup__tautosampler_html_gabe80e37e28f7b454acf1621ab703506f"><div class="ttname"><a href="group__tautosampler.html#gabe80e37e28f7b454acf1621ab703506f">tAutoSampler_setWindowSize</a></div><div class="ttdeci">void tAutoSampler_setWindowSize(tAutoSampler *const, uint32_t size)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1196</div></div>
<div class="ttc" id="agroup__tbuffer_html_gaa68440f784cd947e6bb4eb00cd6473b5"><div class="ttname"><a href="group__tbuffer.html#gaa68440f784cd947e6bb4eb00cd6473b5">tBuffer_getRecordedLength</a></div><div class="ttdeci">uint32_t tBuffer_getRecordedLength(tBuffer *const sb)</div><div class="ttdoc">Get the length of recorded audio in the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:157</div></div>
<div class="ttc" id="agroup__tbuffer_html_gaa7addef34b26a9464a59f023d690ec04"><div class="ttname"><a href="group__tbuffer.html#gaa7addef34b26a9464a59f023d690ec04">tBuffer_free</a></div><div class="ttdeci">void tBuffer_free(tBuffer *const)</div><div class="ttdoc">Free a tBuffer from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:48</div></div>
<div class="ttc" id="agroup__tautosampler_html_ga201113e0c5d4a209bc98719162d256c0"><div class="ttname"><a href="group__tautosampler.html#ga201113e0c5d4a209bc98719162d256c0">tAutoSampler_tick</a></div><div class="ttdeci">float tAutoSampler_tick(tAutoSampler *const, float input)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1121</div></div>
<div class="ttc" id="agroup__tsampler_html_gac7dc95f6705399e73778c96904df2390"><div class="ttname"><a href="group__tsampler.html#gac7dc95f6705399e73778c96904df2390">tSampler_setStart</a></div><div class="ttdeci">void tSampler_setStart(tSampler *const, int32_t start)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:926</div></div>
<div class="ttc" id="agroup__tbuffer_html_ga9fcb0f6e0fb037edf1146a3983d8424d"><div class="ttname"><a href="group__tbuffer.html#ga9fcb0f6e0fb037edf1146a3983d8424d">tBuffer_stop</a></div><div class="ttdeci">void tBuffer_stop(tBuffer *const)</div><div class="ttdoc">Stop recordings samples into the buffer.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:106</div></div>
<div class="ttc" id="agroup__tautosampler_html_ga1317602e4195ebc58d6df3f0263c4bb8"><div class="ttname"><a href="group__tautosampler.html#ga1317602e4195ebc58d6df3f0263c4bb8">tAutoSampler_free</a></div><div class="ttdeci">void tAutoSampler_free(tAutoSampler *const)</div><div class="ttdoc">Free a tAutoSampler from its mempool.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1111</div></div>
<div class="ttc" id="agroup__tautosampler_html_ga2310af54d4e60debedd10003d6ec8113"><div class="ttname"><a href="group__tautosampler.html#ga2310af54d4e60debedd10003d6ec8113">tAutoSampler_setMode</a></div><div class="ttdeci">void tAutoSampler_setMode(tAutoSampler *const, PlayMode mode)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1173</div></div>
<div class="ttc" id="astruct_l_e_a_f_html"><div class="ttname"><a href="struct_l_e_a_f.html">LEAF</a></div><div class="ttdoc">Struct for an instance of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:31</div></div>
<div class="ttc" id="agroup__tautosampler_html_ga8abfe84e7aaf00dc70b5b6e96d99af63"><div class="ttname"><a href="group__tautosampler.html#ga8abfe84e7aaf00dc70b5b6e96d99af63">tAutoSampler_setRate</a></div><div class="ttdeci">void tAutoSampler_setRate(tAutoSampler *const, float rate)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1210</div></div>
<div class="ttc" id="agroup__tbuffer_html_gad24562bae9e5411aa917bee6f27d4153"><div class="ttname"><a href="group__tbuffer.html#gad24562bae9e5411aa917bee6f27d4153">tBuffer_initToPool</a></div><div class="ttdeci">void tBuffer_initToPool(tBuffer *const sb, uint32_t length, tMempool *const mp)</div><div class="ttdoc">Initialize a tBuffer to a specified mempool.</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:32</div></div>
<div class="ttc" id="agroup__tsampler_html_gaf22e3192bf74770101ecae67268ed465"><div class="ttname"><a href="group__tsampler.html#gaf22e3192bf74770101ecae67268ed465">tSampler_tick</a></div><div class="ttdeci">float tSampler_tick(tSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:273</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga4f7de005419ba042c280bc6aa0a43013"><div class="ttname"><a href="group__t_m_b_sampler.html#ga4f7de005419ba042c280bc6aa0a43013">tMBSampler_stop</a></div><div class="ttdeci">void tMBSampler_stop(tMBSampler *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1535</div></div>
<div class="ttc" id="agroup__t_m_b_sampler_html_ga5df0750a1c82828dc7c3d654fd633c63"><div class="ttname"><a href="group__t_m_b_sampler.html#ga5df0750a1c82828dc7c3d654fd633c63">tMBSampler_setSample</a></div><div class="ttdeci">void tMBSampler_setSample(tMBSampler *const, tBuffer *const)</div><div class="ttdef"><b>Definition:</b> leaf-sampling.c:1259</div></div>
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
